<template>
    <div class="themes">
        <ul>
            <router-link  v-for="m in newsModules" :key="m.id"  :to="{name:'newsModule',params:{moduleId:m.id}}"><li>{{m.name}}</li></router-link>
            
        </ul>
    </div>
</template>

<script>
    import newsModuleApis from '../../api/newsModule'
    export default {
        name: "left-themes",
        props:['moduleId'],

        data:function () {
            return {newsModules:{}}
        },
        mounted: function(){
            const _this = this;

            newsModuleApis.findNewsModels()
                .then(function(data){
                    _this.newsModules = data
                })
        }        
    }
</script>

<style scoped>
    .themes li{
        height: 50px;
        text-align: center;
        line-height: 50px;
        background-color: #fbfbfb;
        border-bottom: 1px solid #ebebeb;
        font-family: 微软雅黑;
    }
    .themes li:hover{
        background-color: #ebebeb;
    }
</style>
